home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
tex
/
fr_may92.zip
/
FREQ.DOC
< prev
Wrap
Text File
|
1992-05-04
|
5KB
|
119 lines
Frequency logger for TeX font usage
Answers this question:
"What fonts do I really need to run TeX preview?"
Version: 17 Jan 1992 [prev: 1 December 1991]
Authors: Grant B. Gustafson and Greg Conner.
Other authors will be added here as contributions are made.
email: gustafso@math.utah.edu, conner@math.utah.edu (Internet addresses)
Copyright:
The source code is jointly owned by the authors. It may be used
for educational purposes without limitation. Modified versions
of the sources are considered private copies and should bear
the new authors names but not the present authors names.
Cost:
There is no charge, license fee or obligation. If someone makes
you pay for this, then it violates the intent of the authors.
Responsibility:
This computer program is used at your own risk. If you use it,
then you assume responsibility for anything that happens as a
result of the program operation, including but not limited to
programming errors, faulty operation, file system destruction.
The authors are not responsible.
Purpose:
Log file use by date and time. The usage statistics are logged in one of
two ways, depending upon the program:
1. Log the file name to a file called \freq.dat. This file is
created as needed, and each file open causes an append of the
file \freq.dat. Source: fr.asm
2. Log the file name, system date, system time to a directory
entry, located in a special subdirectory .\FREQ.USE, one level
below the current directory, for each attempted open of a file.
Source: freq.asm
The best use to date of these TSR utilities are as follows:
a. Determine which fonts are used by a TeX previewer or DVI
printer driver.
b. Determine which fonts are used by a particular DVI file.
c. Determine which header files are actually used by a compiler.
d. Check file impact for a complex application like MS Windows.
THE FIRST METHOD: fr.asm.
The method in fr.asm suffers from simplicity and represents the easiest
method from a user point of view. It takes no preparation to use and it
gives the needed usage information in the least amount of time. To start
the TSR, type the file name `fr.com' and let it do its work. While the
TSR runs, certain commands like `DEL \FREQ.DAT' are allowed and
expected. Also, it should be possible to yank the file \FREQ.DAT into
your favorite text editor, while the TSR is running.
The disadvantage is that the file \freq.dat grows with each file open.
Furthermore, many duplicate opens appear in the output file. In
particular, bad opens will appear and also device opens to harmless
files like NUL or CON.
THE SECOND METHOD: freq.asm
The method in freq.asm applies to solve questions of long-term use of
certain files, especially font files, which are not all used on a single
day. The basic idea is to turn on this TSR in autoexec.bat, then run the
computer for a week to see how file usage proceeds.
The record keeping for the second method uses the DOS file structure to
produce a special subdirectory of information. Repeated file use causes
an update of the date and time, but no other frequency information is
retained.
It is emphasized that the original file is untouched by the TSR. The
action taken is to write a directory entry with file length 0, using the
same file name, but in a subdirectory one level lower, with the special
subdirectory name .\FREQ.USE.
It is also emphasized that the subdirectory FREQ.USE is updated by DOS,
and it is therefore normal in every way. All normal DOS operations apply
including DEL, DIR, REN.
To prevent the TSR from doing unnecessary work, a file SAMPLE.TXT will
cause an update to ./FREQ.USE/SAMPLE.TXT only in case the subdirectory
./FREQ.USE already exists. The existence is controlled by the user: the
subdirectory must be first created with the DOS command MKDIR.
If you run the TSR freq.com and nothing happens, then it is because you
did not create a subdirectory FREQ.USE, or because no file open was
attempted in the mother directory to FREQ.USE. In a normal application,
there will be several subdirectories created, all with the name
FREQ.USE, but in different mother directories.
MODIFICATIONS:
It is possible to alter the sources to log more information than is
presently kept. Once we talked about keeping a frequency count in the
time word of the directory entry. It is easy to do and perhaps more
useful than the last access time.
The log to file fr.asm can easily be modified to eliminate uninteresting
file names like NUL and CON. Also, the success of an open can be tested,
before logging. Finally, the system date and time can be logged besides
the file name, if that information is important.
RELEASE TSR:
This TSR contains code to detect its own presence. However, it contains
no code to release it from memory. Such code can be written following
the ideas of Al Williams, "DOS 5: A Developers Guide", page 516 (M&T
Books 1992).
If you find it necessary to release the TSR, then use the mark/release
utilities available on Internet or the tablev/resdel utilities. A good
source for these is wuarchive.wustl.edu, mirrors/msdos directory,
anonymous ftp.